//scripts

//$(window).load(function() {
  //      $('#slider').nivoSlider();
   // });

//form validation
//jQuery(document).ready(function(){
	//$(function () {
	//		$('#InputForm #Button').formValidator({
		//		scope		: '#InputForm',
			//	errorDiv	: '#errorDiv1'
			//});
		//});
//});

//jQuery(document).ready(function(){
	//$("#calendar").calendarWidget({
		//month: 5,
		//year: 2009						  
	// });
 //});

//placeholder
$(document).ready(function() {

	//$("#Nav ul li:nth-child(1) a").css("border-left","none");
	
	jQuery.fn.placeholder = function ()
	{
		if($.browser.msie)
		{
			var PlaceholderVal;
			PlaceholderVal = this.attr("placeholder");
			jQuery(this).val(PlaceholderVal);
			this.click(function(){;
				jQuery(this).val("");
			}).focusout(function(){
				jQuery(this).val(PlaceholderVal);
		});
		}
	}
	
	$("#Nav ul li input").placeholder();

});

//CurrentEvent
jQuery(document).ready(function(){
	var CurrentEvent = $("#CurrentEvent");

	$("#CurrentEvent ul").css("height","0", "opacity","0");
		
		CurrentEvent.hover(
		function()
		{
				jQuery(this).find("ul").stop().animate({ height:80, opacity:1}, 500);
		},
		function()
		{
			jQuery(this).find("ul").stop().animate({ height:0, opacity:0}, 500);
		}

		);
});

//subscribe
jQuery(document).ready(function(){
	var subscribe = $("#Subs");
	
		$("#Subs button").css("opacity","0");
		
		subscribe.focusin(function()
		{
			jQuery(this).find("button").stop().animate({ top:0, opacity:1}, 300);
			$("#Subs button").css("display","block");
		}).focusout(function()
		{
			if(subscribe.find("input").val() == "")
			{
				jQuery(this).find("button").stop().animate({ top:-30, opacity:0}, 300);
				$("#Subs button").css("display","none");
			}
		});
});

//====================tab==========================
$(document).ready(function() {

	//Default Action
	$(".tab_content").hide(); //Hide all content
	$("ul.tabs li:first").addClass("active").show(); //Activate first tab
	$(".tab_content:first").show(); //Show first tab content
	
	//On Click Event
	$("ul.tabs li").click(function() {
		$("ul.tabs li").removeClass("active"); //Remove any "active" class
		$(this).addClass("active"); //Add "active" class to selected tab
		$(".tab_content").hide(); //Hide all tab content
		var activeTab = $(this).find("a").attr("href"); //Find the rel attribute value to identify the active tab + content
		$(activeTab).fadeIn(); //Fade in the active content
		return false;
	});

});


//footer
/*
jQuery(document).ready(function(){
		$("#FooterWrapper").css({position: "relative",top:($(window).scrollTop()+$(window).height()-$("#FooterWrapper").height() -400)+"px"})	;
 
	$(window)
		.scroll(positionFooter)
		.resize(positionFooter)
});
*/